<layout name='layoutP' />
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>项目投资保护条款</title>
<script type="text/javascript">
	$(function() {
		$("#form1").validationEngine();
		$val = "{$clause["type"]}";
		switch ($val) {
		case ("回购"):
				$('#type')[0].selectedIndex = 0;
               $("#label_content").html("回购利率（单利）");
                break;
		case ("股份调整"):
			$('#type')[0].selectedIndex =1;
			  $("#label_content").html("调整比率");
                break;
	     case ("现金补偿"):
	    	 $('#type')[0].selectedIndex = 2;
	    	  $("#label_content").html("金额和比率");
                break;
	     default:
        	$('#type')[0].selectedIndex = 3;
        	$("#div_type").append("<input id='other' type='text' name='other' value='{$clause["type"]}'/>");
        		$("#label_content").html("说明");
		}
		
		
		$("#type").change(function() {
			$val = $("#type").val();
			switch ($val) {
			case ("回购"):
	               $("#label_content").html("回购利率（单利）");
				$("#other").hide();
	                break;
			case ("股份调整"):
				  $("#label_content").html("调整比率");
			$("#other").hide();
	                break;
		     case ("现金补偿"):
		    	  $("#label_content").html("金额和比率");
		     $("#other").hide();
	                break;
            case ("其他"):
            	$("#div_type").append("<input id='other' type='text' name='other' />");
            		$("#label_content").html("说明");
                break;      
            default:
                alert('>41');
			}
		});
	});
	
</script>
</head>
<body>

<div id="wrapper"> 
 
    <div class="form-container">    
    <form id="form1" action="__URL__/postinvest_2_update" method="post">     
    <fieldset> 
        <legend>项目投资保护条款</legend>          
           	<div id="div_type"><label for="type" >保护条款类型 </label> 
           	<select id="type" name="type"  >                
                        <option value="回购">回购</option> 
                        <option value="股份调整">股份调整</option> 
                        <option value="现金补偿">现金补偿</option> 
                        <option value="其他">其他</option>                   
                </select> 
             </div> 
              </fieldset> 
              <fieldset>
            <legend>条款内容说明</legend> 
             <div><label id="label_condition" for="condition" >触发条件 </label> <input  class="validate[required] text-input" id="condition" type="text" name="condition" value="{$clause["condition"]}"  />
             </div> 
          <div><label id="label_content" for="content" >说明 </label> <input  class="validate[required] text-input" id="content" type="text" name="content" value="{$clause["content"]}"  />
             </div>
          
   
 
    
    <div class="buttonrow"> 
        <input type="submit" value="提交" class="button" /> 
    </div> 
 
    </form> 
    
    </div><!-- /form-container --> 
    

</div><!-- /wrapper --> 
	





</body>
